<?php
/**
 * Created by PhpStorm.
 * User: Lin
 * Date: 2017/3/19 0019
 * Time: 下午 17:03
 */
class OrderRelationModel extends RelationModel{
    Protected $tableName='order';
    Protected $_link=array(
        'order_goods'=>array(
            'mapping_type'=>HAS_MANY,
            'foreign_key'=>'order_id',
        ),
        'payment'=>array(
            'mapping_type'=>BELONGS_TO,
            'foreign_key'=>'payment_id',
        ),
        'store'=>array(
            'mapping_type'=>BELONGS_TO,
            'foreign_key'=>'store_id',
        ),
        'shipping'=>array(
            'mapping_type'=>BELONGS_TO,
            'foreign_key'=>'shipping_id',
        ),
    );
}